﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenTK.Input;
using OpenTK;

namespace Pong
{
    class PaddleController
    {
        Paddle paddle;
        public PaddleController(Paddle paddle)
        {
            this.paddle = paddle;
        }
        
        public void Update(GameWindow game)
        {
            if (game.Keyboard[OpenTK.Input.Key.Up]) paddle.PaddleObject.Y += 0.1f;
            if (game.Keyboard[OpenTK.Input.Key.Down]) paddle.PaddleObject.Y -= 0.1f;
            if (game.Keyboard[OpenTK.Input.Key.Left]) paddle.PaddleObject.X -= 0.1f;
            if (game.Keyboard[OpenTK.Input.Key.Right]) paddle.PaddleObject.X += 0.1f;
            if (game.Keyboard[OpenTK.Input.Key.W]) paddle.PaddleObject.Height += 0.1f;
            if (game.Keyboard[OpenTK.Input.Key.S]) paddle.PaddleObject.Height -= 0.1f;
        }

    }
}